/******************************************************************************
 * @file  soft_spi.h
 * 
 * @brief  Define soft spi parameters
 *
 * @author zhanhongjun
 *
 * @date   2025-10-28
 * 
 * @version  Origin version
 *
 ******************************************************************************/
#ifndef __SOFT_SPI_H__
#define __SOFT_SPI_H__


#include <stdint.h>

/* define spi pins  */
#define SPI_CS_GPIO     GPIOB
#define SPI_CS_PIN      GPIO_Pin_12

#define SPI_CLK_GPIO    GPIOB
#define SPI_CLK_PIN     GPIO_Pin_13

#define SPI_DI_GPIO     GPIOB
#define SPI_DI_PIN      GPIO_Pin_14

#define SPI_DO_GPIO     GPIOB
#define SPI_DO_PIN      GPIO_Pin_15


/* define functions */
void spi_init(void);
void spi_delay(void);
void spi_cs_low(void);
void spi_cs_high(void);
uint8_t spi_read_write_byte(uint8_t txData);


#endif
/*******************************************************************************
 * EOF (not truncated)
 ******************************************************************************/
